﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="theme.ascx.cs" Inherits="theme" %>
<!--
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    -->
<link type="text/css" href="JS/jquery/css/themes/<%= tema %>/jquery-ui-1.8.21.custom.css" rel="stylesheet" />
<script type="text/javascript" src="JS/jquery/js/jquery.js"></script>
<script type="text/javascript" src="JS/jquery/js/jquery-ui-1.8.21.custom.min.js"></script>
<script type="text/javascript" src="JS/jquery/js/jquery-ui-i18n.min.js"></script>
<script type="text/javascript" src="JS/jquery/js/jquery-ui-combobox.js"></script>
<style>
	.ui-combobox {
		position: relative;
		display: inline-block;
	}
	.ui-combobox-toggle {
		position: absolute;
		top: 0;
		bottom: 0;
		margin-left: -4px; /*-1px; $3b@*/
		padding: 0;
		/* adjust styles for IE 6/7 */
		*height: 1.7em;
		*top: 0.1em;
	}
	.ui-combobox-input {
		margin: 0;
		padding: 0.3em;
	}
	</style>
<script type="text/javascript" language="javascript">   
    
    var aspbh_exceptions = [];
    var aspbh_endHandler = [];
    
    $(function() {
       bind_ui(); 
    });
    
    aspbh_endHandler.push(bind_ui);
    
    function bind_ui(){
	    
	    $("input:submit, button, a, input:file").each(function(){
	        var obj = $(this);
	        
	        if(obj.hasClass("nui"))
	            return;

            var btn = obj.button();

	        if(obj.is(":not([icon])"))
	        {
	            if(obj.is("a"))
	                btn.button( "option", "icons", {secondary:'ui-icon-triangle-1-ne'} );
            }
            else
            {
                btn.button( "option", "icons", {secondary:'ui-icon-' + obj.attr("icon") } )
                   .button( "option", "text", false);
            }
                
            
            if(!obj.is(":not([disabled])"))
                btn.button( "option", "disabled", true );              
                
	    });

        $.datepicker.setDefaults( $.datepicker.regional[ "es" ] );
	    $("input:text.calendar")
	            .datepicker( $.datepicker.regional[ "es" ] )
	            .datepicker({ dateFormat: "dd/mm/yy" });
	    
	    $("input:checkbox").button(
	                                {icons: {
                                        primary: "ui-icon-radio-off"}
                                    });
        
        $("select").combobox();
                              
	    $("input:radio")
	            .parents("table")
	            .each(function(){ 
	                              var ts = $(this); 
	                              var obj = $("<div id='" + ts.attr("id") + "'></div>"); 
	                              obj
	                                .append(ts.find("input:radio, label"))
	                                .buttonset();
	                              ts.replaceWith(obj); 
	                              });
	            
	    $("input:text,input:password")
	            .addClass("ui-widget ui-corner-all");
        
        $(".grilla").each(function(){
                var obj = $(this);
                obj.addClass("ui-widget ui-widget-content");
                obj.find("tr:first").addClass("ui-widget-header");
            });
            
        
        $("div.accordion").accordion();
        
        $("div.tabs").tabs();
        
        $(".itemerror")
            .each(function(){ var obj = $(this); 
                              obj.html("<span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span>" + obj.html())
                                 .css("margin","2px");})
            .parent()
            .addClass("ui-corner-all ui-widget ui-state-error")
            .css("list-style-type", "none");
            
        $(".itemok")
            .each(function(){ var obj = $(this); 
                              obj.html("<span class='ui-icon ui-icon-info' style='float: left; margin-right: .3em;'></span>" + obj.html())
                                 .css("margin","2px");})
            .parent()
            .addClass("ui-corner-all ui-widget ui-state-highlight")
            .css("list-style-type", "none");
        
        $("#body_div,#body_div_reduced").addClass("ui-corner-all");
        
        var tooltip = $(".tooltip");
        tooltip.addClass("ui-corner-all ui-widget ui-state-highlight")
               .css("cursor","pointer")
               .each(function (){
            var esto = $(this);
            //transitions    		
		    //if mouseover the menu item
		    esto.hover(function () {
    			
    			var obj = $(this);
    			
			    var left = Math.round(obj.offset().left + obj.width() + 5);
			    var top = Math.round(obj.offset().top + obj.height() + 5);
			    //Set it to current item position and text
			    $('#tt_box div').html(esto.attr('alt'));
			    $('#tt_box').stop(false, true).css("left",left).css("top",top).fadeIn();

		    })
		    //If the mouse leave the menu, reset the floating bar to the selected item
		    .mouseleave(function () {
                $('#tt_box').fadeOut();
		    });
        });
        
        if(tooltip.length >0)
            if($("#tt_box").length <= 0)
                $("body").append('<div id="tt_box"><div class="ui-corner-tr ui-corner-bottom"></div></div>');
    }
</script>
<link href="CSS/estructurales.css" rel="stylesheet" type="text/css" />
<asp:LinkButton ID="lnk_CambiarTema" runat="server" onclick="lnk_CambiarTema_Click" style="float:left;" icon="refresh">Tema</asp:LinkButton>
<script type="text/javascript" src="JS/jquery/js/asyncpostbackhandler.js"></script>
